{% extends "speaker_survey/base.html" %}
{% load i18n %}

{% block content %}
<div id="content-main">

{% if speaker %}
<h2>
Survey Results for {{ speaker }}
</h2>

<table border="1">
  <tr>
    <th>Question</th>
    {% for c in choices %}
    <th>
    {{ c }}
    </th>
    {% endfor %}
    <th>Avg Score</th>
  </tr>
  {% for s in scores %}
  <tr>
    {% for ss in s %}
    <td>{{ ss }}</td>
    {% endfor %}
  </tr>
  {% ifequal forloop.counter0 6 %}
  <tr>
    <td>Speaker score</td>
    <td colspan="5">&nbsp;</td>
    <td>{{ sc1 }}</td>
  </tr>
  {% endifequal %}
  {% ifequal forloop.counter0 14 %}
  <tr>
    <td>Presentation score</td>
    <td colspan="5">&nbsp;</td>
    <td>{{ sc2 }}</td>
  </tr>
  {% endifequal %}
  {% endfor %}
</table>

<p>
Number of surveys: {{ num }}<br />
Number of comments: {{ comments|length }}
</p>

<h3>Comments</h3>

<table border="1">
{% for c in comments %}
<tr><td>{{ c|striptags|fix_ampersands }}</td></tr>
{% endfor %}
</table>

{% endif %}

</div>
{% endblock %}

